﻿<?php
header("Content-Type: text/html; charset=utf-8");

// 当验证通过后，启动 session  
session_start();  

define('TT_CONFIG_ROOT', dirname(__FILE__));

require_once TT_CONFIG_ROOT.'/data/config.inc.php';
require_once TT_ROOT.'lib/db.class.php';
require_once TT_ROOT.'lib/func.php';
require_once TT_ROOT.'view/libs/Smarty.class.php';



$_SGLOBAL = array();

/*
$user_login = true;	// 登录状态
$_SGLOBAL['user']['uid'] = 31;
$_SGLOBAL['user']['user'] = "echosha";
$_SGLOBAL['user']['real_name'] = "曹莎";
$_SGLOBAL['user']['image_path'] = '002.gif';
$_SGLOBAL['user']['current_city'] = '台湾';
$action = '0'; 	//用户请求动作，用数值编号
*/
$_SGLOBAL['db'] = new db();
$_SGLOBAL['db']->connect(TT_DBHOST, TT_DBUSER, TT_DBPW, TT_DBNAME, TT_DBCHARSET, TT_DBCONNECT, TT_DBTABLEPRE);

$_SGLOBAL['view']= new Smarty();
 
// 得到用户的登录状态
?>